package net.mlike.openssp.server.security.shiro.token;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * Created by wallellen@hotmail.com on 5/31/18.
 */
public class JwtToken implements AuthenticationToken {
    private String username;
    private String ip;
    private String device;
    private String token;

    public JwtToken(String username, String ip, String device, String token) {
        this.username = username;
        this.ip = ip;
        this.device = device;
        this.token = token;
    }

    public JwtToken() {
    }

        @Override
    public Object getPrincipal() {
        return username;
    }

    @Override
    public Object getCredentials() {
        return token;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getDevice() {
        return device;
    }

    public void setDevice(String device) {
        this.device = device;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}
